The invention relates to a method for forming porous material in at least one microcavity or micropassage of a support, said microcavity or said micro-passage opening out onto a surface of the support.